package com.usabb.api;

import com.ifast.common.base.BaseController;
import com.usabb.service.FileUploadService;
import com.usabb.service.RoundRelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RequestMapping("usabb/api")
@Controller
public class HelloUsabbApiController extends BaseController {

    @Autowired
    FileUploadService fileUploadService;
    @Autowired
    RoundRelationService roundRelationService;


    @ResponseBody
    @GetMapping("/hello")
    public String hello() {
        return "hello usabb";
    }

    @ResponseBody
    @GetMapping("/delete/{bizType}/{bizId}")
    public String deleteBy(@PathVariable(name = "bizType") String bizType,
                           @PathVariable(name = "bizId") Long bizId) {
        final boolean delete = roundRelationService.deleteBy(bizType, bizId);

        return "result: " + delete;
    }


}
